from selenium.webdriver.common.by import By

from web_practice.wework_po.page_object.base_page import BasePage


class ContactPage(BasePage):
    _TIPS_LOC = (By.ID, "js_tips")
    def get_tips(self):
        """获取添加成功的提示信息"""
        # 显示等待，每隔两秒 找一次元素，直到10秒，
        # 局部，针对某个元素
        self.wait_for_visible(self._TIPS_LOC)
        tips_value =self.get_text(*self._TIPS_LOC)
        return tips_value